﻿
namespace BEGDC.PreContract.DAL
{
    using System;
    using System.Collections.Generic;
    using Castle.ActiveRecord;
    using NHibernate.Expression;


    [ActiveRecord]
    public partial class HelpDoc : ActiveRecordBase<HelpDoc>
    {
		#region Const Definition
		
		public const string CONST_DocID									= "DocID";
		public const string CONST_DocDescription						= "DocDescription";
		public const string CONST_DocPath								= "DocPath";
		public const string CONST_DateCreated							= "DateCreated";
		public const string CONST_UploadedBy							= "UploadedBy";

		#endregion
		
        #region Member Variables
        // Primary Key
        private System.Int32 _docID;
        
        // Non Key
        private System.String _docDescription;
        private System.String _docPath;
        private Nullables.NullableDateTime _dateCreated;
        private Nullables.NullableInt32 _uploadedBy;

        // Parents
        
        
		

        #endregion

        public HelpDoc() {
               
        }
        public HelpDoc(
            System.String docDescription
            ,System.String docPath
            ,Nullables.NullableDateTime dateCreated
            ,Nullables.NullableInt32 uploadedBy) : this() {
                
            this._docDescription = docDescription; 
            this._docPath = docPath; 
            this._dateCreated = dateCreated; 
            this._uploadedBy = uploadedBy; 
        }
        
        #region Properties
        // Primary Key        
		
		#if (SQLServer)
        [PrimaryKey]
		#else
		[PrimaryKey(PrimaryKeyType.Native, SequenceName = "SEQ_HELPDOC_DOCID")]
		#endif
        public System.Int32 DocID {
            get { return this._docID; }
            set {  this._docID = value; }
        }
        
        // Non Key
        [Property]
        public System.String DocDescription {
            get { return this._docDescription; }
			set { if (value == null) return; if (value.Length > 1000) this._docDescription = value.Substring(0,1000); else this._docDescription = value; }	
        }
        
        [Property]
        public System.String DocPath {
            get { return this._docPath; }
			set { if (value == null) return; if (value.Length > 500) this._docPath = value.Substring(0,500); else this._docPath = value; }	
        }
        
        [Property]
        public Nullables.NullableDateTime DateCreated {
            get { return this._dateCreated; }
			set { this._dateCreated = value; }
        }
        
        [Property]
        public Nullables.NullableInt32 UploadedBy {
            get { return this._uploadedBy; }
			set { this._uploadedBy = value; }
        }
        
        
        // Parent Relationships
        // Child Relationships
        
		
        #endregion
		
		// Clone
		public HelpDoc Clone()
		{
			HelpDoc newHelpDoc = new HelpDoc();
			
            newHelpDoc.DocDescription = this._docDescription; 
            newHelpDoc.DocPath = this._docPath; 
            newHelpDoc.DateCreated = this._dateCreated; 
            newHelpDoc.UploadedBy = this._uploadedBy; 
			return newHelpDoc;
		}
    }
}



